package code15.io;

import java.io.Serializable;

public class User implements Serializable {
	/**
	 * 序列化id
	 */
	private static final long serialVersionUID = 843816645056360416L;
	public Integer id;
	public String name;
	// transient 临时的, 该修饰符修饰的 属性, 不会被序列化
	// 静态的属性也不会被序列化
	public transient Integer age;
	public User(Integer id, String name, Integer age) {
		this.id = id;
		this.name = name;
		this.age = age;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", name=" + name + ", age=" + age + "]";
	}
}
